package ca.etsmtl.log430.lab3.systemA;

/**
 * Represents a line of project according to the input file.
 * @author ah95800
 *
 */
public class Project implements Comparable<Project> {

	private String numProject;
	private String status;
	private String system;
	private String version;
	private String rate;
	private String state;
	private String description;
	
	public Project(String numProject, String status, String system, String version, String rate, String state, String desc)
	{
		this.numProject 	= numProject;
		this.status 		= status;
		this.system 		= system;
		this.version 		= version;
		this.rate 			= rate;
		this.state 			= state;
		this.description 	= desc;
	}
	
	public Project(String[] attrs)
	{
		this.numProject 	= attrs[0];
		this.status 		= attrs[1];
		this.system 		= attrs[2];
		this.version 		= attrs[3];
		this.rate 			= attrs[4];
		this.state 			= attrs[5];
		this.description 	= attrs[6];
	}
	
	@Override
	public int compareTo(Project arg0) {
		// Compare with the state attribute
		
		return this.state.compareToIgnoreCase(arg0.getState());
	}
	
	public String getNumProject()
	{
		return this.numProject;
	}
	
	public String getStatus()
	{
		return this.status;
	}
	
	public String getSystem()
	{
		return this.system;
	}
	
	public String getVersion()
	{
		return this.version;
	}
	
	public String getRate()
	{
		return this.rate;
	}
	
	public String getState()
	{
		return this.state;
	}
	
	public String getDescription()
	{
		return this.description;
	}
}
